---
title: Get Page Annotations 
description: Learn how to use the getPageAnnotations method to retrieve all annotations for a single PDF page. 
searchable: true
---

# getPageAnnotations

Retrieves an array of all annotation objects for a specific page.

## Signature

```typescript
getPageAnnotations(
  doc: PdfDocumentObject,
  page: PdfPageObject
): PdfTask<PdfAnnotationObject[]>;
```

## Description

This method reads the PDF structure and returns a JavaScript representation of every annotation on the given page. The returned array contains objects that conform to the various `PdfAnnotationObject` types.

This is the standard way to get the data you need to display, interact with, or modify existing annotations on a specific page.

## Parameters

| Name | Type | Description |
| :--- | :--- | :--- |
| **`doc`** | `PdfDocumentObject` | The handle of the document to retrieve annotations from. |
| **`page`** | `PdfPageObject` | The specific page object to inspect. |

## Returns

`PdfTask<PdfAnnotationObject[]>`

A **`Task`** that resolves with an array of `PdfAnnotationObject` instances. If the page has no annotations, it resolves with an empty array.

See [Annotation Models](./annotation-models.md) for details on the structure of these objects. The `Task` will be rejected if the document or page handle is invalid.

See [Concepts: Tasks](../tasks.md) for more on how to handle asynchronous operations.

## Example

```typescript
// Assuming 'engine' and an open 'document' object are available

async function logAnnotationsForFirstPage(doc) {
  try {
    const firstPage = doc.pages[0];
    const annotations = await engine.getPageAnnotations(doc, firstPage).toPromise();

    console.log(`Found ${annotations.length} annotations on page 0.`);

    annotations.forEach(anno => {
      console.log(`- Annotation ID: ${anno.id}, Type: ${anno.type}`);
    });
  } catch (error) {
    console.error('Failed to get page annotations:', error);
  }
}
```

## See Also

  - [Get All Annotations](./get-all-annotations.md)
  - [Update Page Annotation](./update-page-annotation.md)
  - [Remove Page Annotation](./remove-page-annotation.md)
  - [Annotation Models](./annotation-models.md)